<script>
import { mapState } from 'vuex';
import defaultHeader from './defaultHeader.vue';
import simpleHeader from './simpleHeader.vue';

export default {
    components: {
        defaultHeader,
        simpleHeader,
    },
    props: {
        simple: Boolean,
    },
    computed: {
        ...mapState('app', ['clientHeaderLinks']),
        topNavLeftData() {
            return [
                { to: '/', name: '主站', icon: 'icon-shouye1' },
                ...this.clientHeaderLinks,
            ];
        },
    },
    render() {
        return this.simple ? <simpleHeader topNavLeftData={this.topNavLeftData} /> : <defaultHeader topNavLeftData={this.topNavLeftData} />;
    },
};
</script>
